﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace FirstGame
{
    public class MapCell : VisibleGameEntity
    {
        // scale
        private float _Scale = 1.0f;

        public float Scale
        {
            get { return _Scale; }
            set { _Scale = value; }
        }

        #region contructor
        public MapCell(ContentManager content, string strTexture, Vector2 topleft, Vector2 size)
        {
            TopLeft = topleft;
            Size = size;

            Texture2D[] textures = new Texture2D[1];

            textures[0] = content.Load<Texture2D>(strTexture);

            sprites = new List<My2Dsprite>();
            My2Dsprite tempSprite = new My2Dsprite(textures, topleft);
            tempSprite.Size  = size;

            sprites.Add(tempSprite);
            _nSprite++;
        }
        #endregion

        #region update and draw
        public override void Update(GameTime gameTime, InputSystem input)
        {
            sprites[0].Position = TopLeft;
            //base.Update(gameTime, input);
        }
        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            sprites[0].Draw(gameTime,spriteBatch,255);
        }
        
        #endregion

    }
}
